﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using PhatPhucLoc.util;

namespace PhatPhucLoc.dao
{
    class KhachHang_HangHoaDAO
    {
        public static DataTable GetAll_ByID(string id)
        {
            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("ma_khach_hang", SqlDbType.VarChar);
            param[0].Value = id;
            return DataUtil.executeStore("sp_KhachHang_HangHoa_GetAll_ByID", param);
        }


        public static DataTable GetPrice_ByID(string id,string mahang)
        {
            SqlParameter[] param = new SqlParameter[2];
            param[0] = new SqlParameter("@ma_khach_hang", SqlDbType.Int);
            param[0].Value = id;
            param[1] = new SqlParameter("@ma_hang_hoa", SqlDbType.VarChar);
            param[1].Value = mahang;

            return DataUtil.executeStore("sp_KhachHang_HangHoa_GetPrice_ByID", param);
        }
    }
}
